<template>
  <div class="not_auto">
    <div class="big_box" v-for="(item, index) in order_delivery" :key="index">
      <div>
        <span class="span" v-if="index !== order_delivery.length - 1">补发</span>
        <span class="mark" v-if="index !== 0">{{ item.create_time }}</span>
      </div>
      <div class="card">
        <ul>
          <li>
            <div class="left">
              <img src="@/assets/images/pubilc/ico_wenjian.png" alt />
            </div>
            <div class="center">
              <h3>
                文件类型：
                <span>TXT</span>
              </h3>
              <h3>
                文件大小：
                <span>{{ item.card_file_size }}</span>
              </h3>
            </div>
            <div class="right">
              <a :href="item.download_url" download="卡密.txt">
                <van-button color="#FFDD07" class="down" @click="downLoad(item.card_content)">下载文件</van-button>
              </a>
              <!-- <van-button type="default" class="copy">复制卡密</van-button> -->
            </div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["order_delivery"],
  methods: {
    downLoad(url) {
      // window.location.href = url
    }
  }
};
</script>


<style>
.down.van-button--normal {
  padding: 0 0;
}
</style>
<style lang="scss" scoped>
.not_auto {
  width: 100%;
  background: #ffffff;
  padding: 0px 0 25px 0;
  text-align: center;
  .span {
    color: #ffffff;
    font-size: 10px;
    background: #ff4f11;
    padding: 5px 7px 5px 10px;
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
    margin-right: -8px;
    position: relative;
    z-index: 1;
  }
  .mark {
    font-size: 10px;
    // background: #e9e9e9;
    color: #999999;
    padding: 5px 10px;
    border-radius: 18px;
  }
  .big_box {
    padding-top: 5px;
  }
  .card {
    width: 100%;
    padding: 0 12px;
    ul {
      li {
        width: 100%;
        background: #ffffff;
        text-align: left;
        border-radius: 4px;
        margin-top: 18px;
        display: flex;
        justify-content: space-between;
        box-shadow: 0 0 12px 0px rgba($color: #D4D4D4, $alpha: 0.23);
        .left {
          height: 100px;
          width: 100px;
          background: rgba(255, 250, 232, 1);
          margin-right: 23px;
          display: flex;
          justify-content: center;
          align-items: center;
          img {
            width: 34px;
            height: 38px;
          }
        }
        .center {
          flex: 1;
          display: flex;
          flex-direction: column;
          justify-content: center;
          h3 {
            color: #2f2f2f;
            font-size: 13px;
            line-height: 18px;
            font-weight: 600;
            span {
              color: #999999;
            }
          }
          h3:nth-child(1) {
            margin-bottom: 6px;
          }
        }
        .right {
          width: 85px;
          display: flex;
          flex-direction: column;
          justify-content: center;
          .down {
            font-size: 10px !important;
            height: 26px;
            width: 73px;
            color: #2f2f2f !important;
            border-radius: 18px;
            font-weight: 600;
            // padding-left: 10px!important;
          }
          .copy {
            font-size: 10px;
            height: 26px;
            color: #2f2f2f !important;
            width: 73px;
            border-radius: 18px;
            font-weight: 600;
            margin-top: 14px;
          }
        }
      }
    }
  }
}
</style>
